"""
计算笛卡尔坐标下的飞盘得分
"""
import math


def score(x, y):
    """
    获取分数
    :param x:
    :param y:
    :return: int score
    """
    distance = math.sqrt(pow(x, 2) + pow(y, 2))
    if distance <= 1:
        return 10
    elif distance <= 5:
        return 5
    elif distance <= 10:
        return 1
    else:
        return 0
